package springBoot;

import org.springframework.jms.annotation.JmsListener;
import org.springframework.stereotype.Component;

/**
 * Created by lx on 2017/7/7.
 */
@Component
public class Consumer {
    @JmsListener(destination = "sample.queue")
    public void receiveQueue(String text){
        System.out.println("queue ----" + text);
    }
    @JmsListener(destination = "sample.topic")
    public void receiveTopic(String text){
        System.out.println("topic ---- " + text);
    }
}
